

public class Test {
    public static void Print(BinarySearchTree.TreeNode root){
        if(root == null){
            return;
        }
        Print(root.left);
        System.out.print(root.val);
        Print(root.right);
    }
    public static void main(String[] args){
        BinarySearchTree binarySearchTree = new BinarySearchTree();
        int[] array = {5,3,6,4,7,2};
        for(int i = 0; i < array.length; i++){
            binarySearchTree.insert(array[i]);
        }
        binarySearchTree.remove(3);
        System.out.println("==========================");
        System.out.print("中序遍历:");
        Print(binarySearchTree.root);
        System.out.println("\n==========================");

    }
}
